package com.company.service;

import com.company.dao.ChanpinfuwuDao;
import com.company.entity.Chanpinfuwu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChanpinfuwuService {
    @Autowired
    ChanpinfuwuDao chanpinfuwuDao;


    public Chanpinfuwu query(int id) {
        return chanpinfuwuDao.getOne(id);
    }

    public List<Chanpinfuwu> querys() {
        return chanpinfuwuDao.findAll();
    }

    public void save(Chanpinfuwu chanpinfuwu) {
        chanpinfuwuDao.save(chanpinfuwu);
    }

    public void delete(Chanpinfuwu chanpinfuwu) {
        chanpinfuwuDao.delete(chanpinfuwu);
    }
}
